package com.fs.api.client;

import com.fs.api.config.FeignConfig;
import com.fs.api.domain.vo.RobotVO;
import com.fs.api.enumeration.RobotStatus;
import com.fs.common.domain.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "robot-service", configuration = FeignConfig.class)
public interface RobotClient {
    @GetMapping("/robots/batch")
    Result getRobotsByIds(@RequestParam("ids") List<Long> robotIds);

    @PutMapping("/robots/{id}/status")
    Result updateRobotStatus(
            @PathVariable("id") Long id,
            @RequestParam("status") String status);

    @PutMapping("/robots/{id}/location")
    Result updateRobotLocation(@PathVariable("id") Long robotId, @RequestBody String location);

    @PutMapping("/robots/charge/{id}")
    Result chargeRobot(@PathVariable Long id, @RequestParam Integer batteryLevel);
}
